package so.sao.code.service;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.scheduling.annotation.EnableScheduling;

import so.sao.auth.autoreg.annotation.EnableAutoAuthReport;
import so.sao.sso.feign.PortalFeignClient;

@EnableJpaRepositories
@SpringBootApplication(exclude = { MongoDataAutoConfiguration.class,
		MongoAutoConfiguration.class }, scanBasePackages = { "so.sao.code.service", "so.sao.data.feign",
				"so.sao.ffw.feign", "so.sao.sso.feign", "so.sao.log.feign","so.sao.accessories.feign","so.sao.etrace.feign"})
@EnableCaching // 启用缓存
@EnableDiscoveryClient
@EnableFeignClients(basePackages = { "so.sao.data.feign", "so.sao.ffw.feign", "so.sao.sso.feign", "so.sao.log.feign",
		"com.sigmatrix.sc.qrcode.service.feign","so.sao.accessories.feign","so.sao.etrace.feign"})
@EnableAutoAuthReport(action = PortalFeignClient.class, ignoreEmptyLang = true)
@EnableJpaAuditing
@ServletComponentScan
@EnableScheduling
public class CodeServiceApplication extends SpringBootServletInitializer {

	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
		return application.sources(CodeServiceApplication.class);
	}
	


	public static void main(String[] args) {
		SpringApplication.run(CodeServiceApplication.class, args);
	}
}
